GXCountPages
QuickDraw GX sends theGXCountPages
message to determine how many pages are in the file that is about to be despooled. You can override theGXCountPages
message to change the logical number of pages in the spool file. Your override of theGXCountPages
message must match the following formal declaration:
OSErr MyCountPages (gxSpoolFile aSpoolFile, long *numPages);
aSpoolFile
- The spool file.
numPages
- On return, the number of pages in the spool file.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
QuickDraw GX, in its default implementation of theGXImageDocument
message, sends theGXCountPages
message to determine the number of pages in the spool file prior to despooling.You override this message if you need to change the logical number of pages in the spool file (for example, if you are producing thumbnail sketches of the document page with several to a printed page).
The default implementation of this message counts and returns the number of pages in the spool file. If you need to alter the page count returned by this message, you need to first forward the message and then add your own code, as you would in the case of the thumbnail example.
SPECIAL CONSIDERATIONS
You rarely send theGXCountPages
message yourself.You must forward the
GXCountPages
message because QuickDraw GX depends on receiving it to know how many pages to despool. You need to first forward this message and then change the value, if necessary.RESULT CODES
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. gxIncompletePrintFileErr The spool file is not complete. gxCrashedPrintFileErr The spool file could not be opened. gxInvalidPrintFileVersion The version number of the spool file is not valid. SEE ALSO
TheGXImageDocument
message is described on page 4-93.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help